$OpenBSD: patch-Makefile_config_in,v 1.3 2009/03/14 19:01:31 ajacoutot Exp $
--- Makefile.config.in.orig	Tue Mar 25 15:24:58 2008
+++ Makefile.config.in	Sat Mar 14 19:07:03 2009
@@ -35,8 +35,8 @@ HAVE_WCHAR_H_DEFINE = @HAVE_WCHAR_H_DEFINE@
 SHELL = @SHELL@
 CC = @CC@
 CXX = @CXX@
-CCLD = $(CC)
-CXXLD = $(CXX)
+CCLD = $(CC) $(CFLAGS)
+CXXLD = $(CXX) $(CXXFLAGS)
 AR = ar
 RANLIB = @RANLIB@
 LN_S = @LN_S@
@@ -195,6 +195,12 @@ ifeq ($(findstring netbsd,$(HOST_OS)),netbsd)
   CFLAGS_SHLIB = -fpic
 endif
 
+ifeq ($(findstring openbsd,$(HOST_OS)),FIND)
+  SHARED_LIB_TYPE = openbsd
+  SHLIB_SUFFIX = so
+  CFLAGS_SHLIB = -fpic
+  LDFLAGS_SHLIB = -shared
+endif
 ifeq ($(HOST_OS),darwin)
   # This code is not finished; that's why we don't set SHARED_LIB_TYPE.
   # If you can finish it and make it work on AIX, please do.
